﻿@model BTKERP.Model.Product

@{
    ViewBag.Title = "Product";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Update Product</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Product</legend>

        @Html.HiddenFor(model => model.Id)

         <table class="display stylized">
            <tbody>
                <tr>
                    <td> <div class="editor-label">
                            @Html.LabelFor(model => model.Code)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Code)
                            @Html.ValidationMessageFor(model => model.Code)
                        </div>
                    </td>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.Name)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Name)
                            @Html.ValidationMessageFor(model => model.Name)
                        </div> 
                    </td>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.PhysicalBarcode)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.PhysicalBarcode)
                            @Html.ValidationMessageFor(model => model.PhysicalBarcode)
                        </div> 
                    </td>
                </tr>
                <tr>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.PackBarcode)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.PackBarcode)
                            @Html.ValidationMessageFor(model => model.PackBarcode)
                        </div>  
                    </td>
                    <td>
                        <div class="editor-label">
                            @Html.LabelFor(model => model.Description)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.Description)
                            @Html.ValidationMessageFor(model => model.Description)
                        </div> 
                    </td>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.CategoryId)
                        </div>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.CategoryId, (SelectList)ViewData["CategoryList"])
                            @Html.ValidationMessageFor(model => model.CategoryId)
                        </div> 
                    </td>
                </tr>
                <tr>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.PhysicalUnitId)
                        </div>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.PhysicalUnitId, (SelectList)ViewData["UnitList"])
                            @Html.ValidationMessageFor(model => model.PhysicalUnitId)
                        </div>
                    </td>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.PackUnitId)
                        </div>
                        <div class="editor-field">
                            @Html.DropDownListFor(model => model.PackUnitId, (SelectList)ViewData["UnitList"])
                            @Html.ValidationMessageFor(model => model.PackUnitId)
                        </div> 
                    </td>
                    <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.NumberPerPhysical)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.NumberPerPhysical)
                            @Html.ValidationMessageFor(model => model.NumberPerPhysical)
                        </div> 
                    </td>
                </tr>
               
              
               
               
                <tr>
                   
                   <td>
                       <div class="editor-label">
                            @Html.LabelFor(model => model.PhysicalSalePrice)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.PhysicalSalePrice)
                            @Html.ValidationMessageFor(model => model.PhysicalSalePrice)
                        </div>  
                   </td>
                   <td>
                      <div class="editor-label">
                            @Html.LabelFor(model => model.PackSalePrice)
                        </div>
                        <div class="editor-field">
                            @Html.EditorFor(model => model.PackSalePrice)
                            @Html.ValidationMessageFor(model => model.PackSalePrice)
                        </div>  
                   </td>
                </tr>
            </tbody>
        </table>

        <p>
            <input type="submit" value="Save" class="btn btn-green" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
